package com.gonsin.i18n.lib.utils;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;

public class ThreadUtils {

    private static ExecutorService executor = Executors.newSingleThreadExecutor();

    /**
     * 通过线程池执行
     */
    public static <T> Future<T> submit(Callable<T> callable){
        return executor.submit(callable);
    }


}
